package de.maedn.game;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import org.json.simple.JSONAware;
import org.json.simple.JSONValue;

public class JsonLobby  implements JSONAware {
	public String name;
	public String id;
//	public String[] playerNames = new String[4];
	ArrayList<String> playerNames = new ArrayList<String>();
	
	@Override
	public String toJSONString() {
		Map<String, Object> map = new HashMap<String, Object>();
		
		map.put("name", name);
		map.put("id", id);
//		map.put("playerNames", playerNames[0]);
//		map.put("playerNames", playerNames[1]);
//		map.put("playerNames", playerNames[2]);
//		map.put("playerNames", playerNames[3]);
		
//		player_Names.add(playerNames[0]);
//		player_Names.add(playerNames[1]);
//		player_Names.add(playerNames[2]);
//		player_Names.add(playerNames[3]);
//		
		map.put("playerNames", playerNames);
		return JSONValue.toJSONString(map);
	}
}
